# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.BinaryAuthorization.V1.Model.CheckSetResult do
  @moduledoc """
  Result of evaluating one check set.

  ## Attributes

  *   `allowlistResult` (*type:* `GoogleApi.BinaryAuthorization.V1.Model.AllowlistResult.t`, *default:* `nil`) - If the image was exempted by an allow_pattern in the check set, contains the pattern that the image name matched.
  *   `checkResults` (*type:* `GoogleApi.BinaryAuthorization.V1.Model.CheckResults.t`, *default:* `nil`) - If checks were evaluated, contains the results of evaluating each check.
  *   `displayName` (*type:* `String.t`, *default:* `nil`) - The name of the check set.
  *   `explanation` (*type:* `String.t`, *default:* `nil`) - Explanation of this check set result. Only populated if no checks were evaluated.
  *   `index` (*type:* `String.t`, *default:* `nil`) - The index of the check set.
  *   `scope` (*type:* `GoogleApi.BinaryAuthorization.V1.Model.Scope.t`, *default:* `nil`) - The scope of the check set.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :allowlistResult => GoogleApi.BinaryAuthorization.V1.Model.AllowlistResult.t() | nil,
          :checkResults => GoogleApi.BinaryAuthorization.V1.Model.CheckResults.t() | nil,
          :displayName => String.t() | nil,
          :explanation => String.t() | nil,
          :index => String.t() | nil,
          :scope => GoogleApi.BinaryAuthorization.V1.Model.Scope.t() | nil
        }

  field(:allowlistResult, as: GoogleApi.BinaryAuthorization.V1.Model.AllowlistResult)
  field(:checkResults, as: GoogleApi.BinaryAuthorization.V1.Model.CheckResults)
  field(:displayName)
  field(:explanation)
  field(:index)
  field(:scope, as: GoogleApi.BinaryAuthorization.V1.Model.Scope)
end

defimpl Poison.Decoder, for: GoogleApi.BinaryAuthorization.V1.Model.CheckSetResult do
  def decode(value, options) do
    GoogleApi.BinaryAuthorization.V1.Model.CheckSetResult.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.BinaryAuthorization.V1.Model.CheckSetResult do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
